Carlos Garnacho [Tue, 5 Dec 2017 19:05:00 +0000 (20:05 +0100)]
misc: Add InputMethod class
This is a ClutterInputMethod implementation using IBus underneath. The
input method will interact with the currently focused ClutterInputFocus,
be it shell chrome or wayland clients through the text_input protocol.
Carlos Garnacho [Fri, 1 Dec 2017 19:17:17 +0000 (20:17 +0100)]
keyboard: Ensure to resize keys after layer change
The keys possibly need resizing after a (new) layer has been set, there's
however calling places that don't. Instead, fold this._redraw() into
setActiveLayer().
Carlos Garnacho [Fri, 10 Nov 2017 17:29:53 +0000 (18:29 +0100)]
st: Make st_button_fake_release() work with touch press
The st_button_release() call wouldn't happen because StButton does not
set priv->button_mask on touch events. And if we make it called, we can't
try to unset the device grab at the end of the function, as device/sequence
are unset earlier on.
Carlos Garnacho [Thu, 10 Aug 2017 19:06:25 +0000 (21:06 +0200)]
data: Add keyboard layout JSON files
These have been created with the script at
git://repo.or.cz/cldr2json.git to translate the XML android
keymaps at http://www.unicode.org/Public/cldr/latest/keyboards.zip
into JSON, easier to parse from gnome-shell.
Getting the necessary "setting enabled, or input from touchscreen"
conditions to have the OSK shown are not enough on the lack of a
current focus. As we are setting up the caret tracker here, wait for
the focus in event before showing the keyboard.
This fixes 2 issues, with the setting disabled it became really hard
to get the OSK hidden on eg. touchscreen->pointer device switches,
as visibility only depended on the a11y setting here. And secondly,
enabling the setting would always end up with the OSK being shown
regardless of focus, while it should stay hidden if there's no text
edition.
Carlos Garnacho [Fri, 19 Jan 2018 09:45:50 +0000 (10:45 +0100)]
padOsd: Ensure to pick pad devices only
If the underlying X11 input driver creates multiple devices from a single
device node, we may end up picking up the wrong device. So, instead of
picking the first device based on node and bailing out if it's not a pad,
pick the first pad that has that device node, and bail out if there is
none.
Florian Müllner [Sun, 21 Jan 2018 20:04:37 +0000 (21:04 +0100)]
networkAgent: Pick up VPN service dir from pkg-config
It turns out that NetworkManager does export the directory as pkg-config
variable after all, so use that instead of building the path ourselves
from the prefix.
Florian Müllner [Mon, 9 Oct 2017 10:53:04 +0000 (12:53 +0200)]
keyboard: Don't pop up on touch events
We want touch events to enable the keyboard and focus tracking, but
not to actually show it right away. Implement that behavior by only
changing the visibility of the keyboard when triggered by a GSettings
change.
Florian Müllner [Mon, 9 Oct 2017 10:51:08 +0000 (12:51 +0200)]
keyboard: Split enabled setting from enabled state
We enable the keyboard when it is either enabled explicitly via
a11y settings or when using a touch device. We'll soon want to
special-case changes to the GSettings, so track its value in a
dedicated property.
Lubomir Rintel [Wed, 6 Dec 2017 15:55:20 +0000 (16:55 +0100)]
network: unregister the agent when it's disabled
When the agent doesn't work (e.g. when the screen is locked), it shouldn't be
registered with NM. Otherwise it will keep cancelling the requests that
could happily be serviced with system secrets.
Lubomir Rintel [Wed, 6 Dec 2017 15:55:15 +0000 (16:55 +0100)]
network: remove the vpn request when it's serviced
The native agent already forgets about the request at the point it's
serviced and the further attempt to use it (e.g. cancel it when the screen
is locked) will trigger an assertion failure:
Olivier Fourdan [Tue, 7 Nov 2017 14:40:51 +0000 (15:40 +0100)]
ui: Add keyboard accessibility dialog
Show a dialog informing the user each time the keyboard accessibility
flags are changed by one of the clutter backends (either from toggle
keys or two-keys-off modifiers).
Florian Müllner [Thu, 21 Dec 2017 15:51:28 +0000 (16:51 +0100)]
network: Fix visibility of VPN section
Commit f2a9467f91b was too eager to simplify the code, and removed
the bits that hid the section in case no VPNs are set up - add them
back to fix the visibility.
Ray Strode [Fri, 15 Dec 2017 15:05:34 +0000 (10:05 -0500)]
background: don't leak wall clock when background changes
The background code allocates a GnomeWallClock when its first created,
but neglects to drop a reference to that clock at destroy time.
The undestroyed clocks lead to a timerfd leak that eventually prevents
the shell from functioning.
Florian Müllner [Sun, 19 Nov 2017 19:35:25 +0000 (20:35 +0100)]
system: Align submenu labels with parent
All section titles use an icon, while all corresponding submenu items
are plain-text. As a result, labels in submenus aren't aligned with
the labels in the parent, which makes them harder to read and look
unbalanced. Address this by adding additional whitespace to submenu
items to account for the additional elements in the title.
Since commit ef1e27966db2 turned DashItemContainer into an StWidget,
the destroy() method overrides the ClutterActor method, which is at
the very least bad style. Instead, follow the usual pattern of using
a ::destroy handler.
dash: Make sure item labels are only destroyed once
Labels are currently destroyed from both animateOutAndDestroy()
and destroy(), which now (rightfully) triggers a gjs warning. As
the label is created unconditionally since commit 36e5ae4a250,
mirror that and always release it in destroy() and hide it
elsewhere.
Florian Müllner [Sat, 25 Nov 2017 06:15:39 +0000 (07:15 +0100)]
build: Stop detecting features automatically
Auto-detect options add some convenience for platforms where a
particular feature isn't available - systemd on non-Linux OS comes
to mind - but the downside is that it is easy to accidentally build
without a desired feature. We consider the latter much more serious
nowadays, so turn our auto-detect options into regular boolean
options.
status/keyboard: Reset menuItems and Label objects on change
In the current code it could happen that we've menuItems and indicatorLabels
for sources that aren't anymore around, because in case a source is removed
we don't cleanup the their container objects.
Also, we should nullify InputManager's _currentSource when sources change
or it might point to some invalid data again.
So it could happen that we try to access an invalid menuitem or label
if a source change happens mentioning a source that has been deleted.
Carlos Garnacho [Thu, 16 Nov 2017 16:27:12 +0000 (17:27 +0100)]
overview: Protect ::drag-end handlers
These end up emitting item-drag-end/window-drag-end pretty much
without checks. Given the MetaDnd object may end up emitting
::drag-leave as a result of the plugin ending its grab, this
would result on spurious emission of those events and subsequent
warnings.
For extra paranoia, the _inDrag variable has been split into
_inItemDrag/_inWindowDrag so we can't cross the streams.
Florian Müllner [Mon, 23 Oct 2017 08:06:18 +0000 (10:06 +0200)]
windowAttentionHandler: Follow app policy for attention notifications
While window attention notifications are created by the shell itself
rather than applications (most likely as a result of focus stealing
prevention), users still commonly link them to the application for
which they are shown. It makes therefore sense to follow the appropriate
policy set by the user rather than showing them unconditionally.
Florian Müllner [Thu, 5 Oct 2017 08:06:10 +0000 (10:06 +0200)]
dialog: Reset initial focus on destroy
Since 0b02f757f862 we track the button that should have key focus
when the dialog is opened. However when the dialog is reused, the
button may get destroyed - clear the initial focus in that case to
allow setButton() to set a new one.
main: use SA_NODEFER to track signals to being able to raise from alarm
After we receive one of the tracked signals, in case we get stuck inside
the gjs_dumpstack () call, we use an alarm to raise the previously emitted
signal, however without using SA_NODEFER, the raise inside the alarm handler
will be ignored.
To avoid to handle new signals caused by the handler calls, once we get the
first signal, we just ignore them all as they could only lead to dirty traces.
Also, cleaning up a bit the code, and disabling the shell log handler
in dump_gjs_stack_alarm_sigaction since this might lead to a new
gjs_dumpstack () request.
main: call gjs_dumpstack on aborts and traps and optionally on segfaults
In order to debug issues triggered by JS code we might need to
see the stack of it, this is not normally visible in static stack traces,
thus we need to call gjs_dumpstack () before dying the process.
Intercepting signals SIGABRT, SIGTRAP (needed for catching fatal glib
errors) SIGFPE and SIGIOT by default, while introducing a new
'backtrace-segfaults' flag for the SHELL_DEBUG environment variable to
do the same on SIGSEGV and SIGBUS (this is a precaution to avoid that we
corrupt the stack for automatic errors trackers).
In any case after dumping the stack we raise the signal again, in order
to make the system aware of it.
bluetooth: Add missing 'BluetoothHardwareAirplaneMode' to D-Bus interface
This D-Bus property was never been added here, which caused inconsistencies
under some scenarios (e.g. coming back from suspend) if some devices were
previously paired, since _sync() would then make the bluetooth menu visible
unconditially, because of the proxied property evaluating to 'false'.
Adding this to the D-Bus interface makes sure that it's no longer undefined
and returns the right value, fixing the bug.
Florian Müllner [Sun, 15 Oct 2017 22:09:52 +0000 (00:09 +0200)]
popupMenu: Fix setting ImageMenuItem's icons via strings
Commit 28ca96064bcb added support for setting PopupImageMenuItem's icons
via GIcons as well as via strings. However as the check whether an object
implements the GIcon interface only works on GObjects, specifying an icon
name was broken. Fix that to actually allow both strings and GIcons.
Florian Müllner [Fri, 13 Oct 2017 14:17:46 +0000 (16:17 +0200)]
gdm: Remove separate greeter universal access icon
The idea behind always showing the icon on the login screen is that
the users' needs aren't known at that point. However we can achieve
the same behavior by including the 'always-show-universal-access-status'
key in GDM's presets, so drop the special-case.
Jonas Ådahl [Sat, 7 Oct 2017 00:26:24 +0000 (20:26 -0400)]
layout: Unset primary and bottom monitor when headless
We were handling being initially headless by only setting the primary
and bottom monitor if there was any primary monitor, then checking the
primary monitor reference before making calls assuming there was any
monitors.
What we didn't do was unset the primary and bottom monitor when going
headless, meaning that temporarly disconnecting a monitor while having
windows open caused an assert to be triggered due to various code paths
taking the path assuming there are valid monitors.
Unsetting both the primary and bottom monitor when going headless avoids
the code paths in the same way as they were avoided when starting
headless.